package data;

import java.util.Observable;


public class Chrono extends Observable {
	private Temps chrono;
	private boolean pause;
	
	public Chrono(Temps t){
		this.chrono = t;
		this.pause=false;
	}
	
	public void setChrono(Temps t){
		this.chrono = t;
		setChanged();
        notifyObservers();
	}
	
	public void stop(){
		this.pause = true;
		setChanged();
        notifyObservers();
	}
	
	public void start(){
		this.pause = false;
		setChanged();
        notifyObservers();
	}
	
	public Temps getChrono(){
		return this.chrono;
	}

	public boolean is_pause(){
		return this.pause;
	}
	
	public long gettime(){
		return chrono.conversion();
	}
}
